package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.SceneBusinessFunctionRelaMapper;
import com.ruoyi.business.domain.SceneBusinessFunctionRela;
import com.ruoyi.business.service.ISceneBusinessFunctionRelaService;

/**
 * 场景业务功能关系表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SceneBusinessFunctionRelaServiceImpl implements ISceneBusinessFunctionRelaService 
{
    @Autowired
    private SceneBusinessFunctionRelaMapper sceneBusinessFunctionRelaMapper;

    /**
     * 查询场景业务功能关系表
     * 
     * @param id 场景业务功能关系表主键
     * @return 场景业务功能关系表
     */
    @Override
    public SceneBusinessFunctionRela selectSceneBusinessFunctionRelaById(Long id)
    {
        return sceneBusinessFunctionRelaMapper.selectSceneBusinessFunctionRelaById(id);
    }

    /**
     * 查询场景业务功能关系表列表
     * 
     * @param sceneBusinessFunctionRela 场景业务功能关系表
     * @return 场景业务功能关系表
     */
    @Override
    public List<SceneBusinessFunctionRela> selectSceneBusinessFunctionRelaList(SceneBusinessFunctionRela sceneBusinessFunctionRela)
    {
        return sceneBusinessFunctionRelaMapper.selectSceneBusinessFunctionRelaList(sceneBusinessFunctionRela);
    }

    /**
     * 新增场景业务功能关系表
     * 
     * @param sceneBusinessFunctionRela 场景业务功能关系表
     * @return 结果
     */
    @Override
    public int insertSceneBusinessFunctionRela(SceneBusinessFunctionRela sceneBusinessFunctionRela)
    {
        sceneBusinessFunctionRela.setCreateTime(DateUtils.getNowDate());
        return sceneBusinessFunctionRelaMapper.insertSceneBusinessFunctionRela(sceneBusinessFunctionRela);
    }

    /**
     * 修改场景业务功能关系表
     * 
     * @param sceneBusinessFunctionRela 场景业务功能关系表
     * @return 结果
     */
    @Override
    public int updateSceneBusinessFunctionRela(SceneBusinessFunctionRela sceneBusinessFunctionRela)
    {
        sceneBusinessFunctionRela.setUpdateTime(DateUtils.getNowDate());
        return sceneBusinessFunctionRelaMapper.updateSceneBusinessFunctionRela(sceneBusinessFunctionRela);
    }

    /**
     * 批量删除场景业务功能关系表
     * 
     * @param ids 需要删除的场景业务功能关系表主键
     * @return 结果
     */
    @Override
    public int deleteSceneBusinessFunctionRelaByIds(Long[] ids)
    {
        return sceneBusinessFunctionRelaMapper.deleteSceneBusinessFunctionRelaByIds(ids);
    }

    /**
     * 删除场景业务功能关系表信息
     * 
     * @param id 场景业务功能关系表主键
     * @return 结果
     */
    @Override
    public int deleteSceneBusinessFunctionRelaById(Long id)
    {
        return sceneBusinessFunctionRelaMapper.deleteSceneBusinessFunctionRelaById(id);
    }
}
